import java.util.Calendar;
import java.util.GregorianCalendar;

public class test624 {
    public static void main(String[] args) {
        Calendar calendar = new GregorianCalendar();
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH) + 1; 
        int day = calendar.get(Calendar.DAY_OF_MONTH);
        int hour = calendar.get(Calendar.HOUR_OF_DAY);
        int minute = calendar.get(Calendar.MINUTE);
        int second = calendar.get(Calendar.SECOND);
        System.out.printf("当前日期和时间：%d年%d月%d日 %d:%d:%d%n",
                year, month, day, hour, minute, second);
    }
}

